package chapter3.annBean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AnnBeanTest {
	public static void main(String[] args) {
		ApplicationContext context = 
				new ClassPathXmlApplicationContext("chapter3_xml_bean.xml");
		UserController controller = (UserController) context.getBean("userController");
		User user = new User();
		user.setId("10001");
		user.setName("王五");
		System.out.println("===1.控制层调用===");
		controller.addUser(user);
	}
}
